import { createApp, ref } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)
app.use(ElementPlus)
app.provide('$message', app.config.globalProperties.$message)

// 定义系统主题
const theme = ref("light")
app.provide('theme', theme)
document.body.className = "barium-theme-" + theme.value

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

// app.use(bariumComponents.default);
app.mount('#app')
